<br />
<a href="<?php echo base_url().'peminjaman/add' ?>"><img src="<?php echo base_url().'assets/images/2.png' ?>"  />Tambah</a>
<table width="660" border="0" cellpadding="0" cellspacing="0" class="table">
  <tr>
    <th width="24">NO</th>
    <th width="74">NIM</th>
    <th width="70">NAMA</th>

    <th width="84">TGL PINJAM</th>
    <th width="99">TGL HARUS KEMBALI</th>
	 <th width="99">TGL KEMBALI</th>
    <th width="77">Status</th>
  </tr>
  <?php $i=1+$urutan; ?>
  <?php foreach ($query as $row){ ?>
  <tr class="<?php if ($i %2 ==0 ) echo 'zebra' ?>">
    <td><?php echo $i; ?></td>
    <td><?php echo $row['nim'] ?></td>
    <td><?php echo $row['nama'] ?></td>

    <td><?php echo $row['tgl_pinjam'] ?></td>
	<td><?php echo $row['tgl_hrs_kembali'] ?>
    <td><?php echo $row['tgl_kembali'] ?>
	
	</td>
    <td>
	<?php if ($row['status'] == 1){ ?>
	<?php echo anchor('peminjaman/detail_peminjaman/'.$row['id_peminjaman'].'/'.$row['id_member'],'Aktif') ?>
	<?php 
	}
	else{
		echo 'Kembali';
	}
	?>
	
	</td>
  </tr>
  <?php
  $i++;
  } ?>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
<?php echo $this->pagination->create_links(); ?>